Skip to content

Conversation

@neargle
Copy link
Member

@neargle neargle commented Nov 5, 2025

No description provided.

@neargle neargle requested a review from Copilot November 5, 2025 13:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the evaluation system to use a registry-based architecture with profile support. It introduces a new engine and registry system that allows checks to be registered and organized into profiles (basic, extended, additional), replacing the previous hard-coded execution flow.

Key changes:

  • Introduced engine.go and registry.go for profile-based evaluation
  • Added categories.go to define check categories with metadata
  • Converted all evaluation checks to register via init() functions
  • Updated CLI to support --profile=<name> flag
  • Removed deprecated auto-escape functionality

Reviewed Changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/evaluate/engine.go New engine implementing profile-based check execution with Context and CheckFunc abstractions
pkg/evaluate/registry.go New registry system for managing check registration and profile composition
pkg/evaluate/categories.go Category specifications with ordering and default profile assignments
pkg/evaluate/*.go (multiple) Added init() functions to register checks with the new registry
pkg/evaluate/evaluate.go Simplified to delegate to new evaluator system
pkg/evaluate/evaluate_test.go New tests for profile registration and execution
pkg/cli/parse.go Updated to support --profile flag and removed auto-escape feature
pkg/cli/banner.go Updated usage documentation to reflect new profile options
conf/evaluate_conf.go Added Volcano Engine cloud provider metadata API
README.md Updated documentation with new profile-based usage examples
Comments suppressed due to low confidence (1)

pkg/evaluate/service_discorvery_dns.go:1

  • File name contains a typo: 'discorvery' should be 'discovery'. The file should be renamed from service_discorvery_dns.go to service_discovery_dns.go.
package evaluate

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +64 to 68
// if Args["auto-escape"].(bool) {
// plugin.RunSingleTask("auto-escape")
// return true
// }

Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented-out code should be removed rather than left in the codebase. If this functionality may be needed in the future, it should be tracked in version control history or an issue tracker.

Suggested change
// if Args["auto-escape"].(bool) {
// plugin.RunSingleTask("auto-escape")
// return true
// }

Copilot uses AI. Check for mistakes.
@neargle neargle closed this Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants